/**
 * @author maulin
 */
dojo.provide("medryx.model.Visit");
dojo.require("medryx.model.Entity");
dojo.require("medryx.orm.Property");
dojo.require("medryx.model.Team");
dojo.require("medryx.orm.Association");
dojo.require("medryx.orm.converters.DateConverter");
dojo.require("medryx.orm.converters.TimeConverter");


dojo.declare("medryx.model.Visit", medryx.model.Entity, {
    accountNumber:new medryx.orm.Property(),
	admissionDate:new medryx.orm.Property({
		converter: medryx.orm.converters.DateConverter
	}),
	admissionTime:new medryx.orm.Property({
		converter: medryx.orm.converters.TimeConverter
	}),
	dischargeDate:new medryx.orm.Property({
        converter: medryx.orm.converters.DateConverter
    }),
    dischargeTime:new medryx.orm.Property({
        converter: medryx.orm.converters.TimeConverter
    }),
	admittingDiagnosis:new medryx.orm.Property(),
    bed:new medryx.orm.Property(),
	room:new medryx.orm.Property(),
	ward:new medryx.orm.Property(),
	visitType:new medryx.orm.Property(),
	status:new medryx.orm.Property(),
	workingDiagnosis:new medryx.orm.Property(),
	hospitalistTeam:new medryx.orm.Association({associationClass:"medryx.model.Team"}),
	facility:new medryx.orm.Property(),
	financialClass:new medryx.orm.Property(),
	//patient:new medryx.orm.Association({associationClass:"medryx.model.Patient"}) TODO-- TWO SIDED ASSOCIATIONS IN ORM
	primaryClinic:new medryx.orm.Property(),
	referringProvider:new medryx.orm.Property(),
	referringService:new medryx.orm.Property(),
	residentTeam:new medryx.orm.Association({associationClass:"medryx.model.Team"}) //TODO -- make sure this is the only instance of the team (i.e. lookup managed entities)
	
	
});